<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
	<head>
		<base href="<%=basePath %>">
		<meta charset="utf-8">
		<title>物流订单系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<link rel="stylesheet" href=css/bootstrap.min.css>
		<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
		<script type="text/javascript" src="js/bootstrap.js"></script>
		<script type="text/javascript">
			$(function(){
				var tem = '<div class="item">\
				      <img src="images/freight_minibus_small_v2.png" alt="...">\
			      <div class="carousel-caption">\
			       	<h2>小面包车</h2>\
			       	<p>￥<span class="text-danger five">30</span> / 5公里</p>\
			       	<p><span>超里程: </span><span class="per">4元/公里</span></p>\
			       	<p><span>载重： </span><span class="zaizhong">500公斤</span></p>\
			       	<p><span>长宽高: </span><span class="size">12313123</span></p>\
			       	<p><span>体积: </span><span class="tiji">3方</span></p>\
			      </div>\
			    </div>\
			  </div>';
			  
				$.post("cartype/all",function(data){
					$.each(data,function(i){
						var car = $(tem).appendTo("#cartypes");
						if(i == 0){
							car.addClass("active");
						}
						car.find("img").attr("src",this.image);
						car.find("h2").html(this.name);
						car.find("span.five").html(this.price);
						car.find("span.per").html(this.perPrice);
						car.find("span.zaizhong").html(this.zaizhong);
						car.find("span.size").html(this.size);
						car.find("span.tiji").html(this.tiji);
					});
				});
			});
		</script>
		<style>
		.carousel-caption{color:black;}
		</style>
	</head>
	<body style="padding-bottom:25px;">
		<%@include file="/header.jsp" %>
		<div class="container">
			<div class="jumbotron">
			  <h1 style="font-weight: normal;">货运搬家，随叫随到</h1>
			  <h1 style="margin-left:20px;font-weight: normal;">低价实惠，优质司机</h1>
			  <p>货运，我们是专业的</p>
			  <p class="text-center"><a class="btn btn-danger btn-lg" href="#" role="button">立即下单</a></p>
			</div>
			<h2 class="text-left">基本费用</h2>
			<!-- 基本费用 -->
			<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
			  <!-- Indicators -->
			  <ol class="carousel-indicators">
			    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
			    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
			    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
			  </ol>
			
			  <!-- Wrapper for slides -->
			  <div id="cartypes" class="carousel-inner" role="listbox">
			  </div>
			
			  <!-- Controls -->
			  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
			    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
			    <span class="sr-only">Previous</span>
			  </a>
			  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
			    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
			    <span class="sr-only">Next</span>
			  </a>
			</div>
		</div>
	</body>
</html>
